package ru.papergames.common.form;

import ru.papergames.common.model.AbstractPlayer;

/**
 * @author Alexander Troshanin
 */
public abstract class AbstractPlayerForm {

    protected long id;

    protected String username;

    protected String password;

    protected String fullName;

    protected boolean sex;

    protected String email;

    protected int level;

    protected AbstractPlayerForm() {
    }

    protected AbstractPlayerForm(AbstractPlayer player) {
        this.id = player.getId();
        this.username = player.getUsername();
        this.password = player.getPassword();
        this.fullName = player.getFullName();
        this.sex = player.isSex();
        this.email = player.getEmail();
        this.level = player.getLevel();
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getFullName() {
        return fullName;
    }

    public void setFullName(String fullName) {
        this.fullName = fullName;
    }

    public boolean isSex() {
        return sex;
    }

    public void setSex(boolean sex) {
        this.sex = sex;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        this.level = level;
    }

    @Override
    public String toString() {
        return getClass().getName() + "{" +
                "id=" + id +
                ", username='" + username + '\'' +
                '}';
    }
}
